<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue10组件通信</title>
	</head>
	<body>
		<div id="demo1">
			<aaa></aaa>
		</div>
		<template id="aaa">
			<div>
				<h1>there there</h1>
				<bbb cm='pm' :cmsg='pmsg'></bbb>
			</div>
		</template>
	</body>
</html>
<script src="js/vue.js"></script>
<script type="text/javascript">
	var v1=new Vue({
		el:"#demo1",
		data:{
			
		},
		components:{
			'aaa':{
				data(){
					return{
						pm:"hi",
						pmsg:"I am pmsg"
					}
				},
				methods:{
					
				},
				template:"#aaa",
				components:{
					'bbb':{
						props:[
							'cm','cmsg'
						],
						template:"<h3>bb组件--》{{cm}} <br> {{cmsg}}</h3>"
					}
				}
			}
		}
	});
</script>